Integrand size = 29, antiderivative size = 357 \[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {g^3 \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{c^{3/2} e}+\frac {(e f-d g)^3 \text {arctanh}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e \left (c d^2-b d e+a e^2\right )^{3/2}} \]
[Out]
Time = 0.31 (sec) , antiderivative size = 357, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {1660, 857, 635, 212, 738} \[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\frac {2 \left (-x \left (c g^2 \left (-2 a^2 e g+3 a b d g-3 a b e f+3 b^2 d f\right )-b^2 g^3 (b d-a e)+c^2 f (6 a g (e f-d g)-b f (3 d g+e f))+2 c^3 d f^3\right )-b \left (a^2 e g^3+3 a c f g (d g+e f)+c^2 d f^3\right )+b^2 \left (a d g^3+c e f^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )\right )}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2} \left (a e^2-b d e+c d^2\right )}+\frac {g^3 \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{c^{3/2} e}+\frac {(e f-d g)^3 \text {arctanh}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{e \left (a e^2-b d e+c d^2\right )^{3/2}} \]
[In]
[Out]
Rule 212
Rule 635
Rule 738
Rule 857
Rule 1660
Rubi steps \begin{align*} \text {integral}& = \frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}-\frac {2 \int \frac {\frac {\left (b^2-4 a c\right ) \left (d (b d-a e) g^3-c f \left (e^2 f^2-3 d e f g+3 d^2 g^2\right )\right )}{2 c \left (c d^2-b d e+a e^2\right )}-\frac {\left (b^2-4 a c\right ) g^3 x}{2 c}}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{b^2-4 a c} \\ & = \frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {g^3 \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{c e}+\frac {(e f-d g)^3 \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{e \left (c d^2-b d e+a e^2\right )} \\ & = \frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {\left (2 g^3\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{c e}-\frac {\left (2 (e f-d g)^3\right ) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{e \left (c d^2-b d e+a e^2\right )} \\ & = \frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {g^3 \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{c^{3/2} e}+\frac {(e f-d g)^3 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e \left (c d^2-b d e+a e^2\right )^{3/2}} \\ \end{align*}
Time = 3.95 (sec) , antiderivative size = 354, normalized size of antiderivative = 0.99 \[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\frac {2 \left (-b^3 d g^3 x+b^2 \left (a g^3 (-d+e x)+c \left (-e f^3+3 d f g^2 x\right )\right )+b \left (a^2 e g^3+c^2 f^2 (-e f x+d (f-3 g x))+3 a c g (e f (f-g x)+d g (f+g x))\right )+2 c \left (c^2 d f^3 x+a^2 g^2 (d g-e (3 f+g x))+a c f (-3 d g (f+g x)+e f (f+3 g x))\right )\right )}{c \left (-b^2+4 a c\right ) \left (c d^2+e (-b d+a e)\right ) \sqrt {a+x (b+c x)}}+\frac {2 (-e f+d g)^3 \arctan \left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )}{e \sqrt {-c d^2+e (b d-a e)} \left (c d^2+e (-b d+a e)\right )}-\frac {g^3 \log \left (c e \left (b+2 c x-2 \sqrt {c} \sqrt {a+x (b+c x)}\right )\right )}{c^{3/2} e} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(739\) vs. \(2(339)=678\).
Time = 0.84 (sec) , antiderivative size = 740, normalized size of antiderivative = 2.07
method | result | size |
default | \(\frac {\left (-d^{3} g^{3}+3 d^{2} e f \,g^{2}-3 d \,e^{2} f^{2} g +e^{3} f^{3}\right ) \left (\frac {e^{2}}{\left (e^{2} a -b d e +c \,d^{2}\right ) \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}-\frac {\left (b e -2 c d \right ) e \left (2 c \left (x +\frac {d}{e}\right )+\frac {b e -2 c d}{e}\right )}{\left (e^{2} a -b d e +c \,d^{2}\right ) \left (\frac {4 c \left (e^{2} a -b d e +c \,d^{2}\right )}{e^{2}}-\frac {\left (b e -2 c d \right )^{2}}{e^{2}}\right ) \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}-\frac {e^{2} \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (e^{2} a -b d e +c \,d^{2}\right ) \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}\right )}{e^{4}}+\frac {g \left (\frac {2 d^{2} g^{2} \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}+e^{2} g^{2} \left (-\frac {x}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (-\frac {1}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (2 c x +b \right )}{c \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )}{2 c}+\frac {\ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{c^{\frac {3}{2}}}\right )+\frac {6 e^{2} f^{2} \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}-\frac {6 d e f g \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}+\left (-d e \,g^{2}+3 e^{2} f g \right ) \left (-\frac {1}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (2 c x +b \right )}{c \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )\right )}{e^{3}}\) | \(740\) |
[In]
[Out]
Timed out. \[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\int \frac {\left (f + g x\right )^{3}}{\left (d + e x\right ) \left (a + b x + c x^{2}\right )^{\frac {3}{2}}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\int \frac {{\left (f+g\,x\right )}^3}{\left (d+e\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^{3/2}} \,d x \]
[In]
[Out]